﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Home.HotNews.ascx.cs" Inherits="Controls_Home_HotNews" %>
<div class="h_c1" style="position: relative;">
    <asp:Repeater runat="server" ID="rptHotNews" OnItemDataBound="rptHotNews_ItemDataBound">
        <ItemTemplate>
            <div class="h_img_c" id="divItem<%# Container.ItemIndex %>" style="display: none;
                position: absolute;">
                <a href="" runat="server" id="hlimg">
                    <img src="" runat="server" id="img" width="458" height="280" style="border: 0px;" /></a>
                <div class="h_title1">
                    <strong><a href="" runat="server" id="hltitle"></a></strong>
                    <div id="sapo" runat="server"></div>
                </div>
                
            </div>
        </ItemTemplate>
    </asp:Repeater>
</div>
<!--h_c1-->
<script type="text/javascript" language="javascript">
    var length = 0;
    $(document).ready(function () {
        $("div#divItem0").fadeIn();
        length = $("div[id^=divItem]").length;
        setInterval("startSlide()", 5000);
    });
    var indexSlide = 0;
    function startSlide() {
        indexSlide++;
        if (indexSlide > length - 1)
            indexSlide = 0;
        $("div[id^=divItem]").fadeOut();
        $("div#divItem" + indexSlide).fadeIn();
    }
</script>
